<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="linkDetail.title"/></title>
    <meta name="heading" content="<fmt:message key='linkDetail.heading'/>"/>
</head>

<div id="left">
	<fmt:bundle basename="ApplicationResources"><fmt:message key="link.form.page.title"/></fmt:bundle>
	<fmt:bundle basename="ApplicationResources"><fmt:message key="link.form.page.body"/></fmt:bundle>
	<div id="infobox">
	<s:form id="linkForm" action="saveLink" method="post" validate="true">
    <fieldset><legend><fmt:bundle basename="ApplicationResources"><fmt:message key="link.form.fieldset.title"/></fmt:bundle></legend>
      <div class="notes">
        <fmt:bundle basename="ApplicationResources"><fmt:message key="link.form.help.title"/></fmt:bundle>	        
		<fmt:bundle basename="ApplicationResources"><fmt:message key="link.form.help.body"/></fmt:bundle>
      </div>
	  <s:hidden key="link.id" cssClass="inputText" theme="simple"/>
      <div class="required format">	        
        <label for="link.url"><fmt:bundle basename="ApplicationResources"><fmt:message key='link.url'/></fmt:bundle></label>
		<s:textfield key="link.url" cssClass="inputText" theme="simple"/>
      </div>
      <div class="required format">	        
        <label for="link.text"><fmt:bundle basename="ApplicationResources"><fmt:message key='link.text'/></fmt:bundle></label>
		<s:textfield key="link.text" cssClass="inputText" theme="simple"/>
      </div>
      <div class="required format">	        
        <label for="link.tooltip"><fmt:bundle basename="ApplicationResources"><fmt:message key='link.tooltip'/></fmt:bundle></label>
		<s:textfield key="link.tooltip" cssClass="inputText" theme="simple"/>
      </div>

	  <div class="required format">
      	<label for="link.linkCategory.id"><fmt:bundle basename="ApplicationResources"><fmt:message key="link.linkCategory.id"/></fmt:bundle></label>      
		<s:select name="link.linkCategory.id" list="linkCategoryList" listKey="id" listValue="name" theme="simple"/>
	  </div>
	  
	  <div class="required format">
      	<label for="link.linkCategory.linkType.id"><fmt:bundle basename="ApplicationResources"><fmt:message key="link.linkCategory.linkType.id"/></fmt:bundle></label>      
		<s:select name="link.linkCategory.linkType.id" list="linkTypeList" listKey="id" listValue="name" theme="simple"/>
	  </div>
	  
	  <div class="required format">
      	<label for="link.open"><fmt:bundle basename="ApplicationResources"><fmt:message key="link.open"/></fmt:bundle></label>      
		<s:select name="link.open" list="linkOpenType" listKey="id" listValue="name" theme="simple"/>
	  </div>
	      
	</fieldset>		
    <fieldset>
      <div class="submit">
        <div>
          <a class="button" onclick="javascript:submitLinkForm();"><span><fmt:bundle basename="ApplicationResources"><fmt:message key="form.submit"/></fmt:bundle></span></a> 
          <a class="button" onclick="javascript:resetLinkForm();"><span><fmt:bundle basename="ApplicationResources"><fmt:message key="form.cancel"/></fmt:bundle></span></a>
        </div>
      </div>
    </fieldset>
	</s:form>
	</div>								
</div>

<script type="text/javascript">
    Form.focusFirstElement($("linkForm"));
</script>
